package com.victor.dao;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import com.victor.entity.log.Log;


@Mapper
public interface LogDao {
	/**
	 * 查看操作日志
	 * 
	 * @return
	 */
	@Select({ "select * from log order by id desc" })
	List<Log> getAllLogs();

	/**
	 * 添加操作日志
	 * 
	 * @param log
	 * @return
	 */
	@Insert({ "insert into log (date,time,adminid,content,type) values (#{date},#{time},#{adminid},#{content},#{type})" })
	int addLog(Log log);
}
